package day03_oop_code.com.itheima.d5_enum;

public class Test {
    public static void main(String[] args) {
        A a1 = A.X;
        A a2 = A.Y;
        System.out.println("a1 = " + a1);
        System.out.println("a2 = " + a2);

        System.out.println("-------------------------");
        A[] as = A.values();
        for (int i = 0; i < as.length; i++) {
            System.out.println("as[" + i + "] = " + as[i]);
        }
        A x = A.valueOf("X");
        System.out.println("(x == a1) = " + (x == a1));

        System.out.println("a1.ordinal() = " + a1.ordinal());
        System.out.println("a2.ordinal() = " + a2.ordinal());
    }
}
